package com.yupi.yuoj.mapper;

import com.yupi.yuoj.model.dto.question.QuestionQueryRequest;
import com.yupi.yuoj.model.dto.questionsubmit.QuestionSubmitQueryRequest;
import com.yupi.yuoj.model.entity.Question;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yupi.yuoj.model.entity.QuestionSubmit;
import com.yupi.yuoj.model.vo.QuestionSubmitVO;
import com.yupi.yuoj.model.vo.QuestionVO;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
* @author 李胜
* @description 针对表【question(题目)】的数据库操作Mapper
* @createDate 2025-08-27 16:19:26
* @Entity com.yupi.yuoj.model.entity.Question
*/
public interface QuestionMapper extends BaseMapper<Question> {

    /**
     * 分页获取AC提交
     * @param page
     * @param queryRequest
     * @param userId
     * @return
     */
    Page<Question> selectMyAcQuestionPage(Page<Question> page,
                                            @Param("query") QuestionQueryRequest queryRequest,
                                            @Param("userId") Long userId);

    /**
     * 分页获取所有提交
     * @param page
     * @param questionSubmitQueryRequest
     * @param userId
     * @return
     */
    Page<QuestionSubmit> selectMyHistorySubmitQuestionPage(Page<QuestionSubmit> page,
                                                             @Param("query") QuestionSubmitQueryRequest questionSubmitQueryRequest,
                                                             @Param("userId") Long userId);
}




